<%@ page import="cn.kgc.day02.entity.Student" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.TreeMap" %><%--
  Created by IntelliJ IDEA.
  User: mengshun
  Date: 2024/10/9
  Time: 14:55
  To change this template use File | Settings | File Templates.

  jsp的注释
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%--        css样式--%>
    <style>
        table,tr,th,td{
            border: 2px  solid red;
            border-collapse: collapse;
        }
    </style>
    <script>
<%--        javascript--%>
    </script>
</head>
<body>
<%--
    jsp   java server pages   jsp本质servlet
     翻译 .java ->  编译 .class -> 运行  jvm
     hello.jsp  ->  hello_jsp.java   -> hello_jsp.class
    指令
    <%@ page%>  网页信息设置 编码格式  导包   java  import

    html
    css
    javascript
    java
      脚本语言    划分区间 在jsp页面中编写 java代码
      <% %>
      输出语法
      <%= %>
--%>

<%
    Student student = new Student();
    student.setName("lisi");
    student.setId(1);
    student.setAge(20);
    List<Student> students = Arrays.asList(student, student, student);
%>

<table>

    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>年龄</th>
    </tr>
    
    <%
        for (Student stu : students) {
    %>
            <tr>
                <td><%=stu.getId() %></td>
                <td><%=stu.getName() %></td>
                <td><%=stu.getAge() %></td>
            </tr>
    <%
        }
    %>

</table>

</body>
</html>
